#include "PauseAnim.h"

PauseAnim::PauseAnim(void)
{
	blinkPointer = new FatPointer<PauseAnim, void>(this, METHOD(void, PauseAnim, blink));
	setText("PAUSED");
	blinkTimer.addEventListaner(GTimer::TIMER_EVENT, blinkPointer);
	blinkTimer.setTimer(500, 0);
	x = 400 - text_length(font, "PAUSED")/2;
	y = 70;
	setColor(0, 0, 0);
}

PauseAnim::~PauseAnim(void)
{
}

void PauseAnim::blink(Event *e)
{
	visible = !visible;
}

void PauseAnim::show()
{
	visible = true;
	blinkTimer.start();
}

void PauseAnim::hide()
{
	visible = false;
	blinkTimer.stop();
}